//keyof
interface Button {
    type: string
    text: string
}

type ButtonKeys = keyof Button
//上面等同下面
// type ButtonKeys = 'type' | 'text' 

let bk: ButtonKeys = 'text'

console.log('bk', bk)